package com.keensense.vcm.model;

import com.keensense.vcm.model.enums.ArchivesTypeEnum;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import com.keensense.vcm.model.enums.CredentialTypeEnum;
import com.keensense.vcm.model.enums.OrderEnum;
import com.keensense.vcm.model.enums.SortEnum;
import javax.xml.bind.annotation.XmlTransient;

/**
 * @author lanjian
 * @date 2020/5/7 5:23 下午
 */
@XmlRootElement(name = "request")
public class BatchQueryProfileRequest {

    private BatchQueryProfileRequest() {

    }

    public BatchQueryProfileRequest(Page page) {
        this.page = page;
    }

    @XmlElementWrapper(name = "dIds")
    @XmlElement(name = "dId")
    private List<String> dIds;

    /**
     * 姓名 中文、英文、数字和.·-空格，首位不为特殊字符，长度[1,255]
     */
    @XmlElement
    private String name;

    /**
     * 性别，0：男，1：女，-1：未知
     */
    @XmlElement
    private String gender;

    /**
     * 证件号码
     */
    @XmlElement
    private String credentialNumber;

    /**
     * 证件类型，枚举类型 0：身份证 1：护照 2：学生证 3：军官证 4：驾照 5：其他
     */
    @XmlElement
    private CredentialTypeEnum credentialType;

    /**
     * 户籍所在地 长度 [1,255]
     */
    @XmlElement
    private String domicile;

    /**
     * 当前居住地 长度 [1,255]
     */
    @XmlElement
    private String presentPlace;

    /**
     * 创建开始的时间戳
     */
    @XmlElement
    private Long startTime;

    /**
     * 创建结束的时间戳
     */
    @XmlElement
    private Long endTime;
    /**
     * 查询出生日期范围的开始时间 例如2015-09-25
     */
    @XmlElement
    private String bornStartTime;

    /**
     * 查询出生日期范围的结束时间 例如2015-09-25
     */
    @XmlElement
    private String bornEndTime;

    /**
     * 修改开始的时间戳
     */
    @XmlElement
    private Long modifyStartTime;

    /**
     * 修改结束的时间戳
     */
    @XmlElement
    private Long modifyEndTime;

    /**
     * 档案库id列表
     */
    @XmlElementWrapper(name = "aIds")
    @XmlElement(name = "aId")
    private List<String> aIds;

    /**
     * 查询档案库范围，-1：不限，0：无名档案库，1：实名档案库，默认为不限
     */
    @XmlElement
    private ArchivesTypeEnum archivesType;

    /**
     * 图片列表， 仅支持传一张图片 具体参数类型参见pictures
     */
    @XmlElementWrapper(name = "pictures")
    @XmlElement(name = "picture")
    private List<Picture> pictures;

    /**
     * 相似度阈值，范围60~100，图片检索时必须指定,默认60， 可配置文件配置
     */
    @XmlElement
    private Integer similarityThreshold;

    /**
     * 分页信息
     */
    @XmlElement
    private Page page;

    public static class Page {

        public Page(Integer no, Integer size, SortEnum sort, OrderEnum orderName) {
            this.orderName = orderName;
            this.sort = sort;
            this.size = size;
            this.no = no;
        }

        /**
         * 排序名称，如时间:time，相似度:similarity，默认为time
         */
        @XmlElement
        private OrderEnum orderName;

        /**
         * 升序，asc，降序，desc，默认为降序
         */
        @XmlElement
        private SortEnum sort;

        /**
         * 每页条数，范围[1,1000]
         */
        @XmlElement
        private Integer size;

        /**
         * 第几页，为正整数
         */
        @XmlElement
        private Integer no;

        public void setOrderName(OrderEnum orderName) {
            this.orderName = orderName;
        }

        public void setSort(SortEnum sort) {
            this.sort = sort;
        }

        public void setSize(Integer size) {
            this.size = size;
        }

        public void setNo(Integer no) {
            this.no = no;
        }
    }

    @XmlTransient
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @XmlTransient
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @XmlTransient
    public String getCredentialNumber() {
        return credentialNumber;
    }

    public void setCredentialNumber(String credentialNumber) {
        this.credentialNumber = credentialNumber;
    }

    @XmlTransient
    public CredentialTypeEnum getCredentialType() {
        return credentialType;
    }

    public void setCredentialType(CredentialTypeEnum credentialType) {
        this.credentialType = credentialType;
    }

    @XmlTransient
    public String getDomicile() {
        return domicile;
    }

    public void setDomicile(String domicile) {
        this.domicile = domicile;
    }

    @XmlTransient
    public String getPresentPlace() {
        return presentPlace;
    }

    public void setPresentPlace(String presentPlace) {
        this.presentPlace = presentPlace;
    }

    @XmlTransient
    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    @XmlTransient
    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    @XmlTransient
    public String getBornStartTime() {
        return bornStartTime;
    }

    public void setBornStartTime(String bornStartTime) {
        this.bornStartTime = bornStartTime;
    }

    @XmlTransient
    public String getBornEndTime() {
        return bornEndTime;
    }

    public void setBornEndTime(String bornEndTime) {
        this.bornEndTime = bornEndTime;
    }

    @XmlTransient
    public Long getModifyStartTime() {
        return modifyStartTime;
    }

    public void setModifyStartTime(Long modifyStartTime) {
        this.modifyStartTime = modifyStartTime;
    }

    @XmlTransient
    public Long getModifyEndTime() {
        return modifyEndTime;
    }

    public void setModifyEndTime(Long modifyEndTime) {
        this.modifyEndTime = modifyEndTime;
    }

    @XmlTransient
    public List<String> getaIds() {
        return aIds;
    }

    public void setaIds(List<String> aIds) {
        this.aIds = aIds;
    }

    @XmlTransient
    public ArchivesTypeEnum getArchivesType() {
        return archivesType;
    }

    public void setArchivesType(ArchivesTypeEnum archivesType) {
        this.archivesType = archivesType;
    }

    @XmlTransient
    public List<Picture> getPictures() {
        return pictures;
    }

    public void setPictures(List<Picture> pictures) {
        this.pictures = pictures;
    }

    @XmlTransient
    public Integer getSimilarityThreshold() {
        return similarityThreshold;
    }

    public void setSimilarityThreshold(Integer similarityThreshold) {
        this.similarityThreshold = similarityThreshold;
    }

    @XmlTransient
    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }

    @XmlTransient
    public List<String> getdIds() {
        return dIds;
    }

    public void setdIds(List<String> dIds) {
        this.dIds = dIds;
    }
}
